<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>Nordic Thingy:52 v2.2.0 : drv_ext_light.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet_offline.css" rel="stylesheet" type="text/css"/>
<link href="nordic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%" class="blank">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Nordic Semiconductor" src="nordic_small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nordic Thingy:52 v2.2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
<script>
var url=window.location.href.split("/").reverse()[1];
var validLinks= ["nrf5","s130","s132","s212","s332"];
var index;
for (index = 0; index < validLinks.length; ++index) {
   if ( url.indexOf(validLinks[index]) !== -1 ) {
      document.getElementById(validLinks[index]).setAttribute('class', 'doclinks docselected');
   };
};
</script>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('drv__ext__light_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">drv_ext_light.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">  Copyright (c) 2010 - 2017, Nordic Semiconductor ASA</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">  All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">  Redistribution and use in source and binary forms, with or without modification,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">  are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">  1. Redistributions of source code must retain the above copyright notice, this</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">     list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">  2. Redistributions in binary form, except as embedded into a Nordic</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">     Semiconductor ASA integrated circuit in a product or a software update for</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">     such product, must reproduce the above copyright notice, this list of</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">     conditions and the following disclaimer in the documentation and/or other</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">     materials provided with the distribution.</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">  3. Neither the name of Nordic Semiconductor ASA nor the names of its</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">     contributors may be used to endorse or promote products derived from this</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">     software without specific prior written permission.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">  4. This software, with or without modification, must only be used with a</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">     Nordic Semiconductor ASA integrated circuit.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">  5. Any software provided in binary form under this license must not be reverse</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">     engineered, decompiled, modified and/or disassembled.</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">  THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &quot;AS IS&quot; AND ANY EXPRESS</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">  OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">  DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#ifndef __DRV_EXT_LIGHT_H__</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#define __DRV_EXT_LIGHT_H__</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#include &quot;app_error.h&quot;</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#include &quot;drv_sx1509.h&quot;</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#include &quot;sx150x_led_drv_regs.h&quot;</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">#include &quot;sx150x_led_drv_calc.h&quot;</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">#include &quot;app_timer.h&quot;</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga4d6a47aeec194a0f794e99430d600249">   58</a></span>&#160;<span class="preprocessor">#define DRV_EXT_LIGHT_INTENSITY_MAX ((uint8_t)(0xFF))   </span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#gaa73716fd9fe54af5f2fa069ca466da42">   59</a></span>&#160;<span class="preprocessor">#define DRV_EXT_LIGHT_INTENSITY_OFF (0)                 </span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga3cd23071441d22e48823f17ee3879d87">   61</a></span>&#160;<span class="preprocessor">#define DRV_EXT_LIGHT_MAX_PIN_ID_ALLOWED        16      </span></div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#gac0940cc3ff13afcdf3853eb049cdc582">   62</a></span>&#160;<span class="preprocessor">#define DRV_EXT_LIGHT_NUM_LIGHTS_MAX            (((DRV_SX1509_HIGHINPMODE_PIN15_Pos + 1) &lt; (16)) ? \</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">                                                (DRV_SX1509_HIGHINPMODE_PIN15_Pos + 1) : (16))          </span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga958a3db4ecc863d150e6498efabe108c">   64</a></span>&#160;<span class="preprocessor">#define DRV_EXT_LIGHT_IOEXT_CLKX_DIV_MAX        (DRV_SX1509_MISC_CLKX_Msk &gt;&gt; DRV_SX1509_MISC_CLKX_Pos)  </span></div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga15c4951c0665577c37f2cba4ae2a633b">   65</a></span>&#160;<span class="preprocessor">#define DRV_EXT_LIGHT_INVALID_RESYNC_PIN        255     </span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">enum</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;{</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04ae318b9fc662b0e9115317b616b789859">   70</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04ae318b9fc662b0e9115317b616b789859">DRV_EXT_LIGHT_STATUS_CODE_SUCCESS</a>,            </div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a57fc098d5513cb8375be61ee2d7445e0">   71</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a57fc098d5513cb8375be61ee2d7445e0">DRV_EXT_LIGHT_STATUS_CODE_INVALID_PARAM</a>,      </div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04af8036e995b06ac465aad4036deb12476">   72</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04af8036e995b06ac465aad4036deb12476">DRV_EXT_LIGHT_STATUS_CODE_NOT_SUPPORTED</a>,      </div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a34004449eeeb385b460705c537192009">   73</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a34004449eeeb385b460705c537192009">DRV_EXT_LIGHT_STATUS_CODE_INVALID_LIGHT_TYPE</a>, </div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a6060d6f7cbe1a777c1f3602acb537c13">   74</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a6060d6f7cbe1a777c1f3602acb537c13">DRV_EXT_LIGHT_STATUS_CODE_INVALID_TIMER_VALUE</a> </div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;};</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga7ef0e9b9c612cd4b33abc08f125ef661">   80</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;{</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    DRV_EXT_LIGHT_CLKX_DIV_1 = 1,</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    DRV_EXT_LIGHT_CLKX_DIV_2 ,</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    DRV_EXT_LIGHT_CLKX_DIV_4 ,</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    DRV_EXT_LIGHT_CLKX_DIV_8 ,</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    DRV_EXT_LIGHT_CLKX_DIV_16,</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    DRV_EXT_LIGHT_CLKX_DIV_32,</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    DRV_EXT_LIGHT_CLKX_DIV_64,</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}<a class="code" href="group__gpio__ext__driver__led.html#ga7ef0e9b9c612cd4b33abc08f125ef661">drv_ext_light_clkx_div_t</a>;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga3504350ffa8b0b351100141ffbb6d4fe">   93</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;{</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    DRV_EXT_LIGHT_COLOR_NONE,</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    DRV_EXT_LIGHT_COLOR_RED,</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    DRV_EXT_LIGHT_COLOR_GREEN,</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    DRV_EXT_LIGHT_COLOR_YELLOW,</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    DRV_EXT_LIGHT_COLOR_BLUE,</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    DRV_EXT_LIGHT_COLOR_PURPLE,</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    DRV_EXT_LIGHT_COLOR_CYAN,</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    DRV_EXT_LIGHT_COLOR_WHITE</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;}<a class="code" href="group__gpio__ext__driver__led.html#ga3504350ffa8b0b351100141ffbb6d4fe">drv_ext_light_color_mix_t</a>;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#gad263d177e76a81d90bd0db8e5fe9385c">  107</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;{</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385cae99661732c937559d4ca54e9918c6c2a">  109</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385cae99661732c937559d4ca54e9918c6c2a">EXTENDER_OSC_UNUSED</a>,            </div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca103a89f09b1e03b2d0014bf6d5d93803">  110</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca103a89f09b1e03b2d0014bf6d5d93803">EXTENDER_OSC_USED_RUNNING</a>,      </div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca5f082501e46d840360ef0675fb274b63">  111</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca5f082501e46d840360ef0675fb274b63">EXTENDER_OSC_USED_PAUSED</a>,       </div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385caa56831e76c12a706a67a03916e25482a">  112</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385caa56831e76c12a706a67a03916e25482a">EXTENDER_OSC_USED_PERM</a>,         </div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca3bf6e29267c5a9b53460493d52e39e6b">  113</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca3bf6e29267c5a9b53460493d52e39e6b">IOEXT_OSC_STATUS_T_SIZE</a>         </div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}<a class="code" href="group__gpio__ext__driver__led.html#gad263d177e76a81d90bd0db8e5fe9385c">drv_ext_light_ioext_osc_status_t</a>;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="structdrv__ext__light__status__t.html">  118</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;{</div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="structdrv__ext__light__status__t.html#a9cc5cb3a61f1ed082266362135887d07">  120</a></span>&#160;    uint32_t <a class="code" href="structdrv__ext__light__status__t.html#a9cc5cb3a61f1ed082266362135887d07">active_time_ms</a>;                            </div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="structdrv__ext__light__status__t.html#a19f3f024ca76b5842555850c101eed73">  121</a></span>&#160;    uint32_t <a class="code" href="structdrv__ext__light__status__t.html#a19f3f024ca76b5842555850c101eed73">inactive_time_ms</a>;                          </div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="structdrv__ext__light__status__t.html#a88722f81f025fd8ce2c083ac51c53478">  122</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ga3504350ffa8b0b351100141ffbb6d4fe">drv_ext_light_color_mix_t</a> <a class="code" href="structdrv__ext__light__status__t.html#a88722f81f025fd8ce2c083ac51c53478">colors</a>;                   </div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="structdrv__ext__light__status__t.html#a36aba2f7864c9216d375632f5aa0dc6f">  123</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#gad263d177e76a81d90bd0db8e5fe9385c">drv_ext_light_ioext_osc_status_t</a> <a class="code" href="structdrv__ext__light__status__t.html#a36aba2f7864c9216d375632f5aa0dc6f">ioext_osc_status</a>;  </div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;}<a class="code" href="structdrv__ext__light__status__t.html">drv_ext_light_status_t</a>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga0d894298e8457de0c60fb8b1096889e2">  128</a></span>&#160;<span class="preprocessor">#define DRV_EXT_LIGHT_STATUS_INIT                    \</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="preprocessor">{                                                    \</span></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor">    .active_time_ms   = 0,                           \</span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">    .inactive_time_ms = 0,                           \</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">    .colors           = DRV_EXT_LIGHT_COLOR_NONE,    \</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="preprocessor">    .ioext_osc_status = EXTENDER_OSC_UNUSED          \</span></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor">}</span></div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="structdrv__ext__light__data__t.html">  138</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;{</div><div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="structdrv__ext__light__data__t.html#aa223e30cb00d450f95cf56af21801cf7">  140</a></span>&#160;    <a class="code" href="structdrv__ext__light__status__t.html">drv_ext_light_status_t</a> * <a class="code" href="structdrv__ext__light__data__t.html#aa223e30cb00d450f95cf56af21801cf7">p_status</a>;      </div><div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="structdrv__ext__light__data__t.html#ab55f41c2b0a716fd0debe1d6393cbcd2">  141</a></span>&#160;    app_timer_id_t           <a class="code" href="structdrv__ext__light__data__t.html#ab55f41c2b0a716fd0debe1d6393cbcd2">timer</a>;         </div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;}<a class="code" href="structdrv__ext__light__data__t.html">drv_ext_light_data_t</a>;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga6e1e3913bb1c17a3b4868732f67f54fd">  146</a></span>&#160;<span class="preprocessor">#define DRV_EXT_LIGHT_DEF(light_id)                                                                             \</span></div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="preprocessor">    static drv_ext_light_status_t light_id##_timings = DRV_EXT_LIGHT_STATUS_INIT;                               \</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="preprocessor">    static app_timer_t light_id##_timer_data = { {0} };                                                         \</span></div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="preprocessor">    static drv_ext_light_data_t light_id = {.p_status = &amp;light_id##_timings, .timer = &amp;light_id##_timer_data}  \</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga27dd1b25921842fe3ae57b27625f4520">  153</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;{</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#gga27dd1b25921842fe3ae57b27625f4520ab00fed06b2cbbf4a55569a771682aea7">  155</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#gga27dd1b25921842fe3ae57b27625f4520ab00fed06b2cbbf4a55569a771682aea7">DRV_EXT_LIGHT_TYPE_MONO</a>,        </div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#gga27dd1b25921842fe3ae57b27625f4520a60c82fbd5c37b392b06568abb2d34adb">  156</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#gga27dd1b25921842fe3ae57b27625f4520a60c82fbd5c37b392b06568abb2d34adb">DRV_EXT_LIGHT_TYPE_RGB</a>          </div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;}<a class="code" href="group__gpio__ext__driver__led.html#ga27dd1b25921842fe3ae57b27625f4520">drv_ext_light_reg_type_t</a>;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="structdrv__ext__light__conf__t.html">  161</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;{</div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="structdrv__ext__light__conf__t.html#a4fe3df2a683d4951eee750c0a4f5aa73">  163</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ga27dd1b25921842fe3ae57b27625f4520">drv_ext_light_reg_type_t</a> <a class="code" href="structdrv__ext__light__conf__t.html#a4fe3df2a683d4951eee750c0a4f5aa73">type</a>;  </div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keyword">union</span></div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    {</div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="structdrv__ext__light__conf__t.html#a1279ba65efa7d8035332b9b8c4bf5f73">  166</a></span>&#160;        uint8_t <a class="code" href="structdrv__ext__light__conf__t.html#a1279ba65efa7d8035332b9b8c4bf5f73">mono</a>;               </div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keyword">struct</span></div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        {</div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="structdrv__ext__light__conf__t.html#a428eead9f2186ce211fd2c70a4aab011">  169</a></span>&#160;            uint8_t <a class="code" href="structdrv__ext__light__conf__t.html#a428eead9f2186ce211fd2c70a4aab011">r</a>;              </div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="structdrv__ext__light__conf__t.html#a2b68ad38e7f8e78b5d1928e1b5ec8400">  170</a></span>&#160;            uint8_t <a class="code" href="structdrv__ext__light__conf__t.html#a2b68ad38e7f8e78b5d1928e1b5ec8400">g</a>;              </div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="structdrv__ext__light__conf__t.html#ab4318f02bebda5f69666bed4273cd57e">  171</a></span>&#160;            uint8_t <a class="code" href="structdrv__ext__light__conf__t.html#ab4318f02bebda5f69666bed4273cd57e">b</a>;              </div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        }rgb;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    }pin;</div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="structdrv__ext__light__conf__t.html#aa751e4158d1010e16cf3dc2c5ac3b5a7">  174</a></span>&#160;    <a class="code" href="structdrv__ext__light__data__t.html">drv_ext_light_data_t</a> * <a class="code" href="structdrv__ext__light__conf__t.html#aa751e4158d1010e16cf3dc2c5ac3b5a7">p_data</a>;        </div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;}<a class="code" href="structdrv__ext__light__conf__t.html">drv_ext_light_conf_t</a>;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="structdrv__ext__light__init__t.html">  179</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;{</div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="structdrv__ext__light__init__t.html#a508151b70f56c4287396f61aa8f6b1fc">  181</a></span>&#160;    <a class="code" href="structdrv__ext__light__conf__t.html">drv_ext_light_conf_t</a> <span class="keyword">const</span> * <a class="code" href="structdrv__ext__light__init__t.html#a508151b70f56c4287396f61aa8f6b1fc">p_light_conf</a>;          </div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="structdrv__ext__light__init__t.html#a7ad90981fe4efb810a08759bfe032dd9">  182</a></span>&#160;    uint8_t                      <a class="code" href="structdrv__ext__light__init__t.html#a7ad90981fe4efb810a08759bfe032dd9">num_lights</a>;            </div><div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="structdrv__ext__light__init__t.html#a2069c7bdf6ec3f36cade163500e61b46">  183</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ga7ef0e9b9c612cd4b33abc08f125ef661">drv_ext_light_clkx_div_t</a>     <a class="code" href="structdrv__ext__light__init__t.html#a2069c7bdf6ec3f36cade163500e61b46">clkx_div</a>;              </div><div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="structdrv__ext__light__init__t.html#a7942ffa784b49053577ed925bc0094d4">  184</a></span>&#160;    <a class="code" href="structdrv__sx1509__cfg__t.html">drv_sx1509_cfg_t</a> <span class="keyword">const</span>     * <a class="code" href="structdrv__ext__light__init__t.html#a7942ffa784b49053577ed925bc0094d4">p_twi_conf</a>;            </div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="structdrv__ext__light__init__t.html#af5ac896491ef67bec789e5b651ceb415">  185</a></span>&#160;    uint8_t                      <a class="code" href="structdrv__ext__light__init__t.html#af5ac896491ef67bec789e5b651ceb415">resync_pin</a>;            </div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;} <a class="code" href="structdrv__ext__light__init__t.html">drv_ext_light_init_t</a>;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="structdrv__ext__light__rgb__intensity__t.html">  190</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;{</div><div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="structdrv__ext__light__rgb__intensity__t.html#a67ae5f19c0f521ace6d9afac0ff590f4">  192</a></span>&#160;    uint8_t <a class="code" href="structdrv__ext__light__rgb__intensity__t.html#a67ae5f19c0f521ace6d9afac0ff590f4">r</a>;          </div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="structdrv__ext__light__rgb__intensity__t.html#a5ba9b8a1724cc721f0a6fc851b7ef05e">  193</a></span>&#160;    uint8_t <a class="code" href="structdrv__ext__light__rgb__intensity__t.html#a5ba9b8a1724cc721f0a6fc851b7ef05e">g</a>;          </div><div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="structdrv__ext__light__rgb__intensity__t.html#a5f137d6708765a5bb84273e06645a992">  194</a></span>&#160;    uint8_t <a class="code" href="structdrv__ext__light__rgb__intensity__t.html#a5f137d6708765a5bb84273e06645a992">b</a>;          </div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;}<a class="code" href="structdrv__ext__light__rgb__intensity__t.html">drv_ext_light_rgb_intensity_t</a>;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="structdrv__ext__light__rgb__sequence__t.html">  199</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;{</div><div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="structdrv__ext__light__rgb__sequence__t.html#a2da4bc8b6b4448f3e2608be112a51495">  201</a></span>&#160;    <a class="code" href="group__gpio__ext__driver__led.html#ga3504350ffa8b0b351100141ffbb6d4fe">drv_ext_light_color_mix_t</a> <a class="code" href="structdrv__ext__light__rgb__sequence__t.html#a2da4bc8b6b4448f3e2608be112a51495">color</a>;            </div><div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="structdrv__ext__light__rgb__sequence__t.html#a1ff89d7d160e9019b4cf4f442f402d5d">  202</a></span>&#160;    drv_ext_light_sequence_t  <a class="code" href="structdrv__ext__light__rgb__sequence__t.html#a1ff89d7d160e9019b4cf4f442f402d5d">sequence_vals</a>;    </div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;}<a class="code" href="structdrv__ext__light__rgb__sequence__t.html">drv_ext_light_rgb_sequence_t</a>;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="group__gpio__ext__driver__led.html#ga91dc242272b1b5cac0acb2a926ad3bc7">  207</a></span>&#160;<span class="preprocessor">#define SEQUENCE_REAL_VAL_INIT(PARAM) drv_ext_light_sequence_t PARAM = SEQUENCE_DEFAULT_VAL</span></div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;ret_code_t <a class="code" href="group__gpio__ext__driver__led.html#ga8fe19008186699f778b44392ea4d3472">drv_ext_light_reset</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;ret_code_t <a class="code" href="group__gpio__ext__driver__led.html#ga0d97adbf138f2bac221b0ddd0873f729">drv_ext_light_on</a>(uint32_t <span class="keywordtype">id</span>);</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;ret_code_t <a class="code" href="group__gpio__ext__driver__led.html#gac9e6f07ddc6264f7a5c1fe8bc6f88c72">drv_ext_light_off</a>(uint32_t <span class="keywordtype">id</span>);</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;ret_code_t <a class="code" href="group__gpio__ext__driver__led.html#gaf4ebb69047b9423d8ee1b32012905ec8">drv_ext_light_intensity_set</a>(uint32_t <span class="keywordtype">id</span>, uint8_t intensity);</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;ret_code_t <a class="code" href="group__gpio__ext__driver__led.html#ga9095af792e1f6dde9b4e17756d636015">drv_ext_light_rgb_intensity_set</a>(uint32_t <span class="keywordtype">id</span>, <a class="code" href="structdrv__ext__light__rgb__intensity__t.html">drv_ext_light_rgb_intensity_t</a> <span class="keyword">const</span> * <span class="keyword">const</span> p_intensity);</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;ret_code_t <a class="code" href="group__gpio__ext__driver__led.html#ga1fccbca89dfd54f5fbdf2764ffca4e24">drv_ext_light_sequence</a>(uint32_t <span class="keywordtype">id</span>, drv_ext_light_sequence_t * <span class="keyword">const</span> p_sequence);</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;ret_code_t <a class="code" href="group__gpio__ext__driver__led.html#ga0e5cc72e8fb9bb112d3a556f7a2b69fa">drv_ext_light_rgb_sequence</a>(uint32_t <span class="keywordtype">id</span>, <a class="code" href="structdrv__ext__light__rgb__sequence__t.html">drv_ext_light_rgb_sequence_t</a> * <span class="keyword">const</span> p_sequence);</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;ret_code_t <a class="code" href="group__gpio__ext__driver__led.html#ga7a4426fa7e6fa57d7fa9d9a208ecbaf6">drv_ext_light_init</a>(<a class="code" href="structdrv__ext__light__init__t.html">drv_ext_light_init_t</a> <span class="keyword">const</span> * p_init, <span class="keywordtype">bool</span> on_init_reset);</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;</div><div class="ttc" id="structdrv__ext__light__conf__t_html_a1279ba65efa7d8035332b9b8c4bf5f73"><div class="ttname"><a href="structdrv__ext__light__conf__t.html#a1279ba65efa7d8035332b9b8c4bf5f73">drv_ext_light_conf_t::mono</a></div><div class="ttdeci">uint8_t mono</div><div class="ttdoc">Monochrome pin. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:166</div></div>
<div class="ttc" id="structdrv__ext__light__conf__t_html_aa751e4158d1010e16cf3dc2c5ac3b5a7"><div class="ttname"><a href="structdrv__ext__light__conf__t.html#aa751e4158d1010e16cf3dc2c5ac3b5a7">drv_ext_light_conf_t::p_data</a></div><div class="ttdeci">drv_ext_light_data_t * p_data</div><div class="ttdoc">Associated data for this light (app timer and timings). </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:174</div></div>
<div class="ttc" id="structdrv__ext__light__rgb__sequence__t_html"><div class="ttname"><a href="structdrv__ext__light__rgb__sequence__t.html">drv_ext_light_rgb_sequence_t</a></div><div class="ttdoc">The color mix and sequence variables if a sequence (e.g. breathe) is used. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:199</div></div>
<div class="ttc" id="structdrv__ext__light__init__t_html_a508151b70f56c4287396f61aa8f6b1fc"><div class="ttname"><a href="structdrv__ext__light__init__t.html#a508151b70f56c4287396f61aa8f6b1fc">drv_ext_light_init_t::p_light_conf</a></div><div class="ttdeci">drv_ext_light_conf_t const  * p_light_conf</div><div class="ttdoc">Array of lights, each with their specific configuraion. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:181</div></div>
<div class="ttc" id="structdrv__ext__light__init__t_html_a7942ffa784b49053577ed925bc0094d4"><div class="ttname"><a href="structdrv__ext__light__init__t.html#a7942ffa784b49053577ed925bc0094d4">drv_ext_light_init_t::p_twi_conf</a></div><div class="ttdeci">drv_sx1509_cfg_t const  * p_twi_conf</div><div class="ttdoc">pointer to TWI (I2C) configuration for communication between master and IO extender. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:184</div></div>
<div class="ttc" id="structdrv__sx1509__cfg__t_html"><div class="ttname"><a href="structdrv__sx1509__cfg__t.html">drv_sx1509_cfg_t</a></div><div class="ttdoc">SX1509 configuration. </div><div class="ttdef"><b>Definition:</b> drv_sx1509.h:70</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggabc6126af1d45847bc59afa0aa3216b04a34004449eeeb385b460705c537192009"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a34004449eeeb385b460705c537192009">DRV_EXT_LIGHT_STATUS_CODE_INVALID_LIGHT_TYPE</a></div><div class="ttdoc">The type of light is not supported. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:73</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggad263d177e76a81d90bd0db8e5fe9385cae99661732c937559d4ca54e9918c6c2a"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385cae99661732c937559d4ca54e9918c6c2a">EXTENDER_OSC_UNUSED</a></div><div class="ttdoc">Ext osc not used for this light. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:109</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga7ef0e9b9c612cd4b33abc08f125ef661"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga7ef0e9b9c612cd4b33abc08f125ef661">drv_ext_light_clkx_div_t</a></div><div class="ttdeci">drv_ext_light_clkx_div_t</div><div class="ttdoc">Defines the frequency of the LED driver clock (ClkX) of the SX1509 according to ClkX = fOSC/2^(DRV_EX...</div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:80</div></div>
<div class="ttc" id="structdrv__ext__light__rgb__intensity__t_html_a67ae5f19c0f521ace6d9afac0ff590f4"><div class="ttname"><a href="structdrv__ext__light__rgb__intensity__t.html#a67ae5f19c0f521ace6d9afac0ff590f4">drv_ext_light_rgb_intensity_t::r</a></div><div class="ttdeci">uint8_t r</div><div class="ttdoc">Red intensity. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:192</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggabc6126af1d45847bc59afa0aa3216b04af8036e995b06ac465aad4036deb12476"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04af8036e995b06ac465aad4036deb12476">DRV_EXT_LIGHT_STATUS_CODE_NOT_SUPPORTED</a></div><div class="ttdoc">Not supported. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:72</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga0e5cc72e8fb9bb112d3a556f7a2b69fa"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga0e5cc72e8fb9bb112d3a556f7a2b69fa">drv_ext_light_rgb_sequence</a></div><div class="ttdeci">ret_code_t drv_ext_light_rgb_sequence(uint32_t id, drv_ext_light_rgb_sequence_t *const p_sequence)</div><div class="ttdoc">Function for setting color for a given light through the GPIO extender. </div></div>
<div class="ttc" id="structdrv__ext__light__rgb__intensity__t_html"><div class="ttname"><a href="structdrv__ext__light__rgb__intensity__t.html">drv_ext_light_rgb_intensity_t</a></div><div class="ttdoc">Simplified struct for setting RGB intensity directly. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:190</div></div>
<div class="ttc" id="structdrv__ext__light__rgb__sequence__t_html_a2da4bc8b6b4448f3e2608be112a51495"><div class="ttname"><a href="structdrv__ext__light__rgb__sequence__t.html#a2da4bc8b6b4448f3e2608be112a51495">drv_ext_light_rgb_sequence_t::color</a></div><div class="ttdeci">drv_ext_light_color_mix_t color</div><div class="ttdoc">Color mix used for the sequence. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:201</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga7a4426fa7e6fa57d7fa9d9a208ecbaf6"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga7a4426fa7e6fa57d7fa9d9a208ecbaf6">drv_ext_light_init</a></div><div class="ttdeci">ret_code_t drv_ext_light_init(drv_ext_light_init_t const *p_init, bool on_init_reset)</div><div class="ttdoc">Function for initializing the drv_ext_light driver. </div></div>
<div class="ttc" id="structdrv__ext__light__conf__t_html_a2b68ad38e7f8e78b5d1928e1b5ec8400"><div class="ttname"><a href="structdrv__ext__light__conf__t.html#a2b68ad38e7f8e78b5d1928e1b5ec8400">drv_ext_light_conf_t::g</a></div><div class="ttdeci">uint8_t g</div><div class="ttdoc">RGB G pin. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:170</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_gad263d177e76a81d90bd0db8e5fe9385c"><div class="ttname"><a href="group__gpio__ext__driver__led.html#gad263d177e76a81d90bd0db8e5fe9385c">drv_ext_light_ioext_osc_status_t</a></div><div class="ttdeci">drv_ext_light_ioext_osc_status_t</div><div class="ttdoc">The state of the IO extender oscillator for each light. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:107</div></div>
<div class="ttc" id="structdrv__ext__light__conf__t_html_a428eead9f2186ce211fd2c70a4aab011"><div class="ttname"><a href="structdrv__ext__light__conf__t.html#a428eead9f2186ce211fd2c70a4aab011">drv_ext_light_conf_t::r</a></div><div class="ttdeci">uint8_t r</div><div class="ttdoc">RGB R pin. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:169</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggad263d177e76a81d90bd0db8e5fe9385caa56831e76c12a706a67a03916e25482a"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385caa56831e76c12a706a67a03916e25482a">EXTENDER_OSC_USED_PERM</a></div><div class="ttdoc">Ext osc used on a permanent basis (light dimmed). </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:112</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggad263d177e76a81d90bd0db8e5fe9385ca3bf6e29267c5a9b53460493d52e39e6b"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca3bf6e29267c5a9b53460493d52e39e6b">IOEXT_OSC_STATUS_T_SIZE</a></div><div class="ttdoc">Number of different possible IO extender oscillator statuses. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:113</div></div>
<div class="ttc" id="structdrv__ext__light__rgb__sequence__t_html_a1ff89d7d160e9019b4cf4f442f402d5d"><div class="ttname"><a href="structdrv__ext__light__rgb__sequence__t.html#a1ff89d7d160e9019b4cf4f442f402d5d">drv_ext_light_rgb_sequence_t::sequence_vals</a></div><div class="ttdeci">drv_ext_light_sequence_t sequence_vals</div><div class="ttdoc">Defines sequence values: on/off/fade_in/fade_out times, and on/off intensities. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:202</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga0d97adbf138f2bac221b0ddd0873f729"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga0d97adbf138f2bac221b0ddd0873f729">drv_ext_light_on</a></div><div class="ttdeci">ret_code_t drv_ext_light_on(uint32_t id)</div><div class="ttdoc">Function for turning a given light on. </div></div>
<div class="ttc" id="structdrv__ext__light__init__t_html_af5ac896491ef67bec789e5b651ceb415"><div class="ttname"><a href="structdrv__ext__light__init__t.html#af5ac896491ef67bec789e5b651ceb415">drv_ext_light_init_t::resync_pin</a></div><div class="ttdeci">uint8_t resync_pin</div><div class="ttdoc">Pin used to resync IO extender counters. Use DRV_EXT_LIGHT_INVALID_RESYNC_PIN if unused. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:185</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga1fccbca89dfd54f5fbdf2764ffca4e24"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga1fccbca89dfd54f5fbdf2764ffca4e24">drv_ext_light_sequence</a></div><div class="ttdeci">ret_code_t drv_ext_light_sequence(uint32_t id, drv_ext_light_sequence_t *const p_sequence)</div><div class="ttdoc">Function for setting color for a given light through the GPIO extender. </div></div>
<div class="ttc" id="structdrv__ext__light__init__t_html"><div class="ttname"><a href="structdrv__ext__light__init__t.html">drv_ext_light_init_t</a></div><div class="ttdoc">Struct for initializing the light driver. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:179</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga9095af792e1f6dde9b4e17756d636015"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga9095af792e1f6dde9b4e17756d636015">drv_ext_light_rgb_intensity_set</a></div><div class="ttdeci">ret_code_t drv_ext_light_rgb_intensity_set(uint32_t id, drv_ext_light_rgb_intensity_t const *const p_intensity)</div><div class="ttdoc">Function for setting color for RGB LEDs. </div></div>
<div class="ttc" id="structdrv__ext__light__conf__t_html_ab4318f02bebda5f69666bed4273cd57e"><div class="ttname"><a href="structdrv__ext__light__conf__t.html#ab4318f02bebda5f69666bed4273cd57e">drv_ext_light_conf_t::b</a></div><div class="ttdeci">uint8_t b</div><div class="ttdoc">RGB B pin. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:171</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggad263d177e76a81d90bd0db8e5fe9385ca103a89f09b1e03b2d0014bf6d5d93803"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca103a89f09b1e03b2d0014bf6d5d93803">EXTENDER_OSC_USED_RUNNING</a></div><div class="ttdoc">Ext osc running (Light currently on). </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:110</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_gaf4ebb69047b9423d8ee1b32012905ec8"><div class="ttname"><a href="group__gpio__ext__driver__led.html#gaf4ebb69047b9423d8ee1b32012905ec8">drv_ext_light_intensity_set</a></div><div class="ttdeci">ret_code_t drv_ext_light_intensity_set(uint32_t id, uint8_t intensity)</div><div class="ttdoc">Function for setting intensity of monochrome light. </div></div>
<div class="ttc" id="structdrv__ext__light__data__t_html"><div class="ttname"><a href="structdrv__ext__light__data__t.html">drv_ext_light_data_t</a></div><div class="ttdoc">App timer and internal light timing struct. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:138</div></div>
<div class="ttc" id="structdrv__ext__light__data__t_html_ab55f41c2b0a716fd0debe1d6393cbcd2"><div class="ttname"><a href="structdrv__ext__light__data__t.html#ab55f41c2b0a716fd0debe1d6393cbcd2">drv_ext_light_data_t::timer</a></div><div class="ttdeci">app_timer_id_t timer</div><div class="ttdoc">App timer information. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:141</div></div>
<div class="ttc" id="structdrv__ext__light__data__t_html_aa223e30cb00d450f95cf56af21801cf7"><div class="ttname"><a href="structdrv__ext__light__data__t.html#aa223e30cb00d450f95cf56af21801cf7">drv_ext_light_data_t::p_status</a></div><div class="ttdeci">drv_ext_light_status_t * p_status</div><div class="ttdoc">Light status information. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:140</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_gga27dd1b25921842fe3ae57b27625f4520ab00fed06b2cbbf4a55569a771682aea7"><div class="ttname"><a href="group__gpio__ext__driver__led.html#gga27dd1b25921842fe3ae57b27625f4520ab00fed06b2cbbf4a55569a771682aea7">DRV_EXT_LIGHT_TYPE_MONO</a></div><div class="ttdoc">Monochrome (single) LED. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:155</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga8fe19008186699f778b44392ea4d3472"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga8fe19008186699f778b44392ea4d3472">drv_ext_light_reset</a></div><div class="ttdeci">ret_code_t drv_ext_light_reset(void)</div><div class="ttdoc">Function for resetting all the registers of the IO extender to their default values. </div></div>
<div class="ttc" id="structdrv__ext__light__conf__t_html_a4fe3df2a683d4951eee750c0a4f5aa73"><div class="ttname"><a href="structdrv__ext__light__conf__t.html#a4fe3df2a683d4951eee750c0a4f5aa73">drv_ext_light_conf_t::type</a></div><div class="ttdeci">drv_ext_light_reg_type_t type</div><div class="ttdoc">Monochrome or RGB. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:163</div></div>
<div class="ttc" id="structdrv__ext__light__status__t_html"><div class="ttname"><a href="structdrv__ext__light__status__t.html">drv_ext_light_status_t</a></div><div class="ttdoc">Struct used by the app_timer handler, mainly for power saving. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:118</div></div>
<div class="ttc" id="structdrv__ext__light__status__t_html_a19f3f024ca76b5842555850c101eed73"><div class="ttname"><a href="structdrv__ext__light__status__t.html#a19f3f024ca76b5842555850c101eed73">drv_ext_light_status_t::inactive_time_ms</a></div><div class="ttdeci">uint32_t inactive_time_ms</div><div class="ttdoc">Total time for a light to be off. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:121</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggad263d177e76a81d90bd0db8e5fe9385ca5f082501e46d840360ef0675fb274b63"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggad263d177e76a81d90bd0db8e5fe9385ca5f082501e46d840360ef0675fb274b63">EXTENDER_OSC_USED_PAUSED</a></div><div class="ttdoc">Ext osc paused (Light currently off). </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:111</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga27dd1b25921842fe3ae57b27625f4520"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga27dd1b25921842fe3ae57b27625f4520">drv_ext_light_reg_type_t</a></div><div class="ttdeci">drv_ext_light_reg_type_t</div><div class="ttdoc">Monochrome (single) or RGB light. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:153</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_gac9e6f07ddc6264f7a5c1fe8bc6f88c72"><div class="ttname"><a href="group__gpio__ext__driver__led.html#gac9e6f07ddc6264f7a5c1fe8bc6f88c72">drv_ext_light_off</a></div><div class="ttdeci">ret_code_t drv_ext_light_off(uint32_t id)</div><div class="ttdoc">Function for turning a given light off. </div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggabc6126af1d45847bc59afa0aa3216b04a57fc098d5513cb8375be61ee2d7445e0"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a57fc098d5513cb8375be61ee2d7445e0">DRV_EXT_LIGHT_STATUS_CODE_INVALID_PARAM</a></div><div class="ttdoc">Invalid parameters. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:71</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ga3504350ffa8b0b351100141ffbb6d4fe"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ga3504350ffa8b0b351100141ffbb6d4fe">drv_ext_light_color_mix_t</a></div><div class="ttdeci">drv_ext_light_color_mix_t</div><div class="ttdoc">The following color combinations are possible when using drv_ext_light_rgb_sequence_t. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:93</div></div>
<div class="ttc" id="structdrv__ext__light__rgb__intensity__t_html_a5ba9b8a1724cc721f0a6fc851b7ef05e"><div class="ttname"><a href="structdrv__ext__light__rgb__intensity__t.html#a5ba9b8a1724cc721f0a6fc851b7ef05e">drv_ext_light_rgb_intensity_t::g</a></div><div class="ttdeci">uint8_t g</div><div class="ttdoc">Green intensity. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:193</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_gga27dd1b25921842fe3ae57b27625f4520a60c82fbd5c37b392b06568abb2d34adb"><div class="ttname"><a href="group__gpio__ext__driver__led.html#gga27dd1b25921842fe3ae57b27625f4520a60c82fbd5c37b392b06568abb2d34adb">DRV_EXT_LIGHT_TYPE_RGB</a></div><div class="ttdoc">RGB LED (three IOs used). </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:156</div></div>
<div class="ttc" id="structdrv__ext__light__conf__t_html"><div class="ttname"><a href="structdrv__ext__light__conf__t.html">drv_ext_light_conf_t</a></div><div class="ttdoc">Struct that defines the type of light (monochrome or RGB) and the corresponding connected pins...</div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:161</div></div>
<div class="ttc" id="structdrv__ext__light__status__t_html_a36aba2f7864c9216d375632f5aa0dc6f"><div class="ttname"><a href="structdrv__ext__light__status__t.html#a36aba2f7864c9216d375632f5aa0dc6f">drv_ext_light_status_t::ioext_osc_status</a></div><div class="ttdeci">drv_ext_light_ioext_osc_status_t ioext_osc_status</div><div class="ttdoc">Status, holds information on the current use of the IO extender oscillator. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:123</div></div>
<div class="ttc" id="structdrv__ext__light__status__t_html_a9cc5cb3a61f1ed082266362135887d07"><div class="ttname"><a href="structdrv__ext__light__status__t.html#a9cc5cb3a61f1ed082266362135887d07">drv_ext_light_status_t::active_time_ms</a></div><div class="ttdeci">uint32_t active_time_ms</div><div class="ttdoc">Total time for a light to be on or dimmed. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:120</div></div>
<div class="ttc" id="structdrv__ext__light__status__t_html_a88722f81f025fd8ce2c083ac51c53478"><div class="ttname"><a href="structdrv__ext__light__status__t.html#a88722f81f025fd8ce2c083ac51c53478">drv_ext_light_status_t::colors</a></div><div class="ttdeci">drv_ext_light_color_mix_t colors</div><div class="ttdoc">Color mix used for breathe, single-shot, or blink. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:122</div></div>
<div class="ttc" id="structdrv__ext__light__init__t_html_a7ad90981fe4efb810a08759bfe032dd9"><div class="ttname"><a href="structdrv__ext__light__init__t.html#a7ad90981fe4efb810a08759bfe032dd9">drv_ext_light_init_t::num_lights</a></div><div class="ttdeci">uint8_t num_lights</div><div class="ttdoc">Number of connected lights. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:182</div></div>
<div class="ttc" id="structdrv__ext__light__init__t_html_a2069c7bdf6ec3f36cade163500e61b46"><div class="ttname"><a href="structdrv__ext__light__init__t.html#a2069c7bdf6ec3f36cade163500e61b46">drv_ext_light_init_t::clkx_div</a></div><div class="ttdeci">drv_ext_light_clkx_div_t clkx_div</div><div class="ttdoc">IO extender clock divider. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:183</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggabc6126af1d45847bc59afa0aa3216b04a6060d6f7cbe1a777c1f3602acb537c13"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04a6060d6f7cbe1a777c1f3602acb537c13">DRV_EXT_LIGHT_STATUS_CODE_INVALID_TIMER_VALUE</a></div><div class="ttdoc">The desired time is too long. Increase the ClkX divider. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:74</div></div>
<div class="ttc" id="group__gpio__ext__driver__led_html_ggabc6126af1d45847bc59afa0aa3216b04ae318b9fc662b0e9115317b616b789859"><div class="ttname"><a href="group__gpio__ext__driver__led.html#ggabc6126af1d45847bc59afa0aa3216b04ae318b9fc662b0e9115317b616b789859">DRV_EXT_LIGHT_STATUS_CODE_SUCCESS</a></div><div class="ttdoc">Successful. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:70</div></div>
<div class="ttc" id="structdrv__ext__light__rgb__intensity__t_html_a5f137d6708765a5bb84273e06645a992"><div class="ttname"><a href="structdrv__ext__light__rgb__intensity__t.html#a5f137d6708765a5bb84273e06645a992">drv_ext_light_rgb_intensity_t::b</a></div><div class="ttdeci">uint8_t b</div><div class="ttdoc">Blue intensity. </div><div class="ttdef"><b>Definition:</b> drv_ext_light.h:194</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="topicfooter">
<a href="mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback" id="maillink">Documentation feedback</a> | <a href="https://devzone.nordicsemi.com/questions/" target="_blank">Developer Zone</a> | <a href="http://response.nordicsemi.com/subscribe-to-our-newsletters" target="_blank">Subscribe</a> | Updated <span id="date"/>
<script>
var date = new Date("Thu Feb 7 2019" + " UTC");
document.getElementById("date").innerHTML = date.toJSON().slice(0, 10);
var url=window.location.href.split("?")[0];
var filename=url.substring(url.lastIndexOf('/')+1);
document.getElementById("maillink").href = "mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback"+decodeURIComponent("%26")+"body=File%20name%3A%20"+encodeURIComponent(filename);
</script>
</div>
</body>
</html>
